#include <iostream>
#include <cstdio>
#include <string>
#include <unistd.h>
#include <fcntl.h>

int main()
{
    std::string tips = "Please Enter# ";
    char buffer[1024];
    while(true)
    {
        write(0,tips.c_str(),tips.size());
        int n = read(0,buffer,sizeof(buffer));
        if(n > 0)
        {
            buffer[n] = 0;
            std::cout << "echo# " << buffer << std::endl; 
        }
        else
        {
            std::cout << "read error" << std::endl;
        }
    }
    return 0;
}



